/**
 * Created by li on 2016/12/29.
 */
var global = global||{};
global = {
    ceilWidth:30,
    ceilHeight:30,
    current_score:0,
    high_score:0,
    pause:false,
    isFalling:false,//false，四格是否正在下落，代表未生成，或已经下落完毕，true，正在下落
    randomTypeArray:['O','Z','N','L','F','T','I'],
    //up指四格初始化放向，left旋转90，down 180，right 270
    randomDirectionArray:['up','down','left','right'],
    getRandowType : function () {
        var index = Math.ceil(Math.random()*global.randomTypeArray.length-1);
        return global.randomTypeArray[index];
    },
    getRandowDirection : function(){
        var index = Math.ceil(Math.random()*global.randomDirectionArray.length-1);
        return global.randomDirectionArray[index];
    },
    getRandowX:function(){
        //这个数值·稍后修改
        return Math.ceil(Math.random()*6);
    }

}
//



